package com.aspose.cells;

class zavc extends CollectionBase {
   WorksheetCollection b;

   zavc(WorksheetCollection var1) {
      this.b = var1;
   }

   public Style a(int var1) {
      return (Style)this.a.get(var1);
   }

   int a(Style var1) {
      if (var1.e() == this.b) {
         int var2 = this.a.size();

         for(int var3 = 0; var3 < var2; ++var3) {
            Style var4 = (Style)this.a.get(var3);
            if (var1 == var4 || var1.h() == var4.h() && var1.b(var4) && this.a(var1.getFont(), var4.getFont()) && this.a(var1, var4)) {
               return var3;
            }
         }
      }

      Style var5 = new Style(this.b);
      var5.copy(var1);
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var5);
      return this.a.size() - 1;
   }

   private boolean a(Style var1, Style var2) {
      BorderCollection var3 = var1.getBorders();
      BorderCollection var4 = var2.getBorders();
      return var3.getByBorderType(4).b(var4.getByBorderType(4)) && var3.getByBorderType(8).b(var4.getByBorderType(8)) && var3.getByBorderType(1).b(var4.getByBorderType(1)) && var3.getByBorderType(2).b(var4.getByBorderType(2));
   }

   private boolean a(Font var1, Font var2) {
      return var1.b.a(var2.b) && var1.i() == var2.i() && com.aspose.cells.b.a.zv.b(var1.getName(), var2.getName()) && var1.isBold() == var2.isBold() && var1.isItalic() == var2.isItalic() && var1.e() == var2.e() && com.aspose.cells.b.a.zv.b(var1.a(), var2.a()) && var1.g() == var2.g() && var1.f() == var2.f() && var1.h() == var2.h();
   }

   int b(Style var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
      return this.getCount() - 1;
   }

   // $FF: synthetic method
   public Object get(int x0) {
      return this.a(x0);
   }
}
